3.127 \(\int \sqrt{a+\frac{b}{x}} \left (c+\frac{d}{x}\right ) \, dx\)

Optimal. Leaf size=74 \[ -\frac{\sqrt{a+\frac{b}{x}} (2 a d+b c)}{a}+\frac{(2 a d+b c) \tanh ^{-1}\left (\frac{\sqrt{a+\frac{b}{x}}}{\sqrt{a}}\right )}{\sqrt{a}}+\frac{c x \left (a+\frac{b}{x}\right )^{3/2}}{a} \]

[Out]

-(((b*c + 2*a*d)*Sqrt[a + b/x])/a) + (c*(a + b/x)^(3/2)*x)/a + ((b*c + 2*a*d)*Ar
cTanh[Sqrt[a + b/x]/Sqrt[a]])/Sqrt[a]

_______________________________________________________________________________________

Rubi [A]  time = 0.146402, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263 \[ -\frac{\sqrt{a+\frac{b}{x}} (2 a d+b c)}{a}+\frac{(2 a d+b c) \tanh ^{-1}\left (\frac{\sqrt{a+\frac{b}{x}}}{\sqrt{a}}\right )}{\sqrt{a}}+\frac{c x \left (a+\frac{b}{x}\right )^{3/2}}{a} \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[a + b/x]*(c + d/x),x]

[Out]

-(((b*c + 2*a*d)*Sqrt[a + b/x])/a) + (c*(a + b/x)^(3/2)*x)/a + ((b*c + 2*a*d)*Ar
cTanh[Sqrt[a + b/x]/Sqrt[a]])/Sqrt[a]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 12.818, size = 63, normalized size = 0.85 \[ \frac{c x \left (a + \frac{b}{x}\right )^{\frac{3}{2}}}{a} - \frac{2 \sqrt{a + \frac{b}{x}} \left (a d + \frac{b c}{2}\right )}{a} + \frac{2 \left (a d + \frac{b c}{2}\right ) \operatorname{atanh}{\left (\frac{\sqrt{a + \frac{b}{x}}}{\sqrt{a}} \right )}}{\sqrt{a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((c+d/x)*(a+b/x)**(1/2),x)

[Out]

c*x*(a + b/x)**(3/2)/a - 2*sqrt(a + b/x)*(a*d + b*c/2)/a + 2*(a*d + b*c/2)*atanh
(sqrt(a + b/x)/sqrt(a))/sqrt(a)

_______________________________________________________________________________________

Mathematica [A]  time = 0.122252, size = 63, normalized size = 0.85 \[ \sqrt{a+\frac{b}{x}} (c x-2 d)+\frac{(2 a d+b c) \log \left (2 \sqrt{a} x \sqrt{a+\frac{b}{x}}+2 a x+b\right )}{2 \sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[a + b/x]*(c + d/x),x]

[Out]

Sqrt[a + b/x]*(-2*d + c*x) + ((b*c + 2*a*d)*Log[b + 2*a*x + 2*Sqrt[a]*Sqrt[a + b
/x]*x])/(2*Sqrt[a])

_______________________________________________________________________________________

Maple [B]  time = 0.016, size = 163, normalized size = 2.2 \[{\frac{1}{2\,bx}\sqrt{{\frac{ax+b}{x}}} \left ( 2\,da\ln \left ( 1/2\,{\frac{2\,\sqrt{a{x}^{2}+bx}\sqrt{a}+2\,ax+b}{\sqrt{a}}} \right ){x}^{2}b+4\,d{a}^{3/2}\sqrt{a{x}^{2}+bx}{x}^{2}+2\,c\sqrt{a{x}^{2}+bx}\sqrt{a}{x}^{2}b+c{b}^{2}\ln \left ({\frac{1}{2} \left ( 2\,\sqrt{a{x}^{2}+bx}\sqrt{a}+2\,ax+b \right ){\frac{1}{\sqrt{a}}}} \right ){x}^{2}-4\,d \left ( a{x}^{2}+bx \right ) ^{3/2}\sqrt{a} \right ){\frac{1}{\sqrt{x \left ( ax+b \right ) }}}{\frac{1}{\sqrt{a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((c+d/x)*(a+b/x)^(1/2),x)

[Out]

1/2*((a*x+b)/x)^(1/2)/x*(2*d*a*ln(1/2*(2*(a*x^2+b*x)^(1/2)*a^(1/2)+2*a*x+b)/a^(1
/2))*x^2*b+4*d*a^(3/2)*(a*x^2+b*x)^(1/2)*x^2+2*c*(a*x^2+b*x)^(1/2)*a^(1/2)*x^2*b
+c*b^2*ln(1/2*(2*(a*x^2+b*x)^(1/2)*a^(1/2)+2*a*x+b)/a^(1/2))*x^2-4*d*(a*x^2+b*x)
^(3/2)*a^(1/2))/(x*(a*x+b))^(1/2)/a^(1/2)/b

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(a + b/x)*(c + d/x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.259379, size = 1, normalized size = 0.01 \[ \left [\frac{2 \,{\left (c x - 2 \, d\right )} \sqrt{a} \sqrt{\frac{a x + b}{x}} +{\left (b c + 2 \, a d\right )} \log \left (2 \, a x \sqrt{\frac{a x + b}{x}} +{\left (2 \, a x + b\right )} \sqrt{a}\right )}{2 \, \sqrt{a}}, \frac{{\left (c x - 2 \, d\right )} \sqrt{-a} \sqrt{\frac{a x + b}{x}} -{\left (b c + 2 \, a d\right )} \arctan \left (\frac{a}{\sqrt{-a} \sqrt{\frac{a x + b}{x}}}\right )}{\sqrt{-a}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(a + b/x)*(c + d/x),x, algorithm="fricas")

[Out]

[1/2*(2*(c*x - 2*d)*sqrt(a)*sqrt((a*x + b)/x) + (b*c + 2*a*d)*log(2*a*x*sqrt((a*
x + b)/x) + (2*a*x + b)*sqrt(a)))/sqrt(a), ((c*x - 2*d)*sqrt(-a)*sqrt((a*x + b)/
x) - (b*c + 2*a*d)*arctan(a/(sqrt(-a)*sqrt((a*x + b)/x))))/sqrt(-a)]

_______________________________________________________________________________________

Sympy [A]  time = 21.0534, size = 121, normalized size = 1.64 \[ 2 \sqrt{a} d \operatorname{asinh}{\left (\frac{\sqrt{a} \sqrt{x}}{\sqrt{b}} \right )} - \frac{2 a d \sqrt{x}}{\sqrt{b} \sqrt{\frac{a x}{b} + 1}} + \sqrt{b} c \sqrt{x} \sqrt{\frac{a x}{b} + 1} - \frac{2 \sqrt{b} d}{\sqrt{x} \sqrt{\frac{a x}{b} + 1}} + \frac{b c \operatorname{asinh}{\left (\frac{\sqrt{a} \sqrt{x}}{\sqrt{b}} \right )}}{\sqrt{a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c+d/x)*(a+b/x)**(1/2),x)

[Out]

2*sqrt(a)*d*asinh(sqrt(a)*sqrt(x)/sqrt(b)) - 2*a*d*sqrt(x)/(sqrt(b)*sqrt(a*x/b +
 1)) + sqrt(b)*c*sqrt(x)*sqrt(a*x/b + 1) - 2*sqrt(b)*d/(sqrt(x)*sqrt(a*x/b + 1))
 + b*c*asinh(sqrt(a)*sqrt(x)/sqrt(b))/sqrt(a)

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(a + b/x)*(c + d/x),x, algorithm="giac")

[Out]

Exception raised: TypeError